package com.snailhd.filter;

import com.alibaba.fastjson.JSON;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import javax.validation.constraints.NegativeOrZero;

/**
 * @author hd
 * @date 2019-12-16 01:21
 */

@Setter
@Getter
@NoArgsConstructor
public class FilterParams {

    private String className;

    private String params;

    public StocksFilter getBean() throws Exception {
        Class clazz = Class.forName(className);
        StocksFilter filter = (StocksFilter)JSON.parseObject(params,clazz);
        return filter;
    }
}
